package cn.aj.org.controller;

import cn.aj.basic.utils.PageListUtil;
import cn.aj.org.domain.SysLog;
import cn.aj.org.query.SysLogQuery;
import cn.aj.org.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys")
@Api(value = "aop的api", description = "aop的crud以及其它功能")
public class SysLogController {

    @Autowired
    private SysLogService sysLogService;

    /**
    * @Description: TODO
    * @Author: aj
    * @Version: 1.0
    * @Date:  2022/11/10 0010 13:41
     * 分页
    */
    @PostMapping
    @ApiOperation(value = "日志分页查询")
    public PageListUtil<SysLog> loadPage(@ApiParam(value="封装的每页条数以及页码",required = true) @RequestBody SysLogQuery sysLogQuery) {
        PageListUtil<SysLog> list = sysLogService.loadPage(sysLogQuery);
        return list;
    }
}
